public class Test {
    public static void main(String[] args) {
        Admin admin=new Admin("Admin","123456");
        try {
        admin.login("admin","123456");
        }catch (NameException e){
         e.printStackTrace();
         System.out.println("用户名错误");
       }catch (PasswordException e){
            e.printStackTrace();
            System.out.println("密码错误");
        }
    }

}
